<!DOCTYPE html>
<html>
<#include "../../include/resource.html">
<body>
<!--  V1.6.6.2 zhangyz 2013-10-29 start -->
	<#assign nid="shop"> 
<!--  V1.6.6.2 zhangyz 2013-10-29 end -->
	<#include "../../common/function.html"> 
	<#include "../../include/header.html">
	 
	<!-- #main start-->
	<div id="main" class="clearfix" >
		<!-- .wrap950 开始-->
		<div class="wrap950 ">
			<!--左边的导航user_left 开始-->
			<!--  V1.6.7.1 zhangyz 2013-11-20 start -->
			<div class="user_left">
				<#assign mid="m_shop" >
				<#include "../user_menu.html">
			</div>
			 <!--  V1.6.7.1 zhangyz 2013-11-20 end -->
			<!--左边的导航user_left 结束-->

			<!--右边的内容user_right 开始-->
			<div class="user_right">
				
				<!--右边的内容user_right_main 开始-->
				<div class="user_right_main">
					<div class="user_main_title well" style="height:25px; padding-top:3px;"> 
						记录时间：<input type="text" name="dotime1" id="dotime1" value="${dotime1?default("")}" size="15" onClick="change_picktime()"/> 
						到 <input type="text"  name="dotime2" value="${dotime2?default("")}" id="dotime2" size="15" onClick="change_picktime()"/>   
						<select name="type_id" id="type_id">
							<option>全部</option>
							<#list typeList as item>
							<option <#if item.id == type_id>selected="selected"</#if> value="${(item.id)!}">${(item.name)!}</option>
							</#list>
						</select>
						<input value="搜索" type="submit" class="btn-action" onClick="sousuo();" /> 
					</div>	
					<!-- 内容开始 -->
					<!--  V1.6.6.2 zhangyz 2013-10-29 start -->
					<form action="" method="post">
						<table  border="0"  cellspacing="1" class="table table-striped  table-condensed" >
							<tr class="head">
								<td>积分类型</td>
								<td>积分变动数值</td>
								<td>变动类型</td>
								<td>备注</td>
								<td>记录时间</td>
							</tr>
							<#list creditList as item>
							<tr>
								<td><#list typeList as type><#if type.id == item.type_id >${type.name}</#if></#list></td>
								<td>${item.value}</td>
								<td><#if item.op == 1 >增加<#elseif item.op == 2>减少<#else>积分无变动</#if></td>
								<td width="40%" >${item.remark!"-"}</td>
								<td>${dateformat(item.addtime?c)}</td>
							</tr>
							</#list>
							<tr>
								<td colspan="11" class="page">
									<div align="center">
										<#import "../../common/page.html" as pager>  
			         	 				<@pager.pagination page=page url="/credit/userlog.html" map=params style="style1"  />
		         	 				</div>  
								</td>
							</tr>
						</table>
					</form>	
					 <!--  V1.6.6.2 zhangyz 2013-10-29 end -->
					<!-- 内容结束 -->
				</div>
				<!--右边的内容user_right_main 结束-->
			</div>
			<!--右边的内容user_right 结束-->
		</div>
		<!-- .wrap950 结束-->
	</div>
	<!-- #main start-->
	<script>
	var url = "";
	
	function sousuo(){
		var _url = "userlog.html?search=true";
		var dotime1 = jQuery("#dotime1").val();
		var dotime2 = jQuery("#dotime2").val();
		var type_id = jQuery("#type_id").val();
		var isFirst=true;
		if (dotime1!=null){
			 _url += "&dotime1="+dotime1;
		}
		if (dotime2!=null){
			 _url += "&dotime2="+dotime2;
		}
		if (type_id!=null){
			 _url += "&type_id="+type_id;
		}
		location.href=url+_url;
		
	}

	</script>
	<#include "../../include/footer.html">